matlab code for newton method nonlinear equations